Update to fileType detection, it now works.

Previous implemented file.type is empty which fails this verification.
Merge pull request #110 from danimt/patch-1

Update to fileType detection, it now works.