Remove trailing spaces
Standardise file headers
Make command-line invokable files executable
pdf2xml.py: Handle files with various characters in them and improve error messages