Use mimemagic to detect filetype if the file has no extension
Merge pull request #9 from xnutsive/master

Use mimemagic to detect filetype if the file has no extension