Improved filetype check to use imghdr
Merge pull request #1 from dannyj/master

Improved filetype checking