PEP8 it
Get output type from file's name if it was not given
Add tests for output file type
Merge branch 'guess-file-type'