corrected logic of file-type detection based on file-extension
Merge pull request #8 from oddjobsman/master

corrected logic of file-type detection based on file-extension