Raw open should be avoided to prevent that in case of an exception
the file is not closed.
This also has the advantage that if the user forgets to call close
the file is still closed.
Issue:
On Windows platforms, when writing files with python in text-mode, LF
characters get converted to CRLF.
This behavior leads to incorrect code generation in the steps following
parse_xml.py
Fix:
Replace file access mode by 'wb' to avoid any platform-dependent behavior
regarding newlines.