Use mimemagic to detect filetype if the file has no extension