Add additional means of discovering file type on file upload. Merge master.
Merge pull request #441 from cpoulain/master

Add additional means of discovering file type on file upload.