decode_keys.py - Factored out decoding/writing output into separate method.
decode_keys.py - Factored out writing output into separate method
Fixed string length encoding in main.dat
It is now possible to specify the xml-file when running the script
Fixed final end-tag
Factored out some common functions into pathologic.py
write_maindat_xml now accepts either a path or a file-like object