Try matching uploaded file type before defaulting to first official one

memoize type_from_file_command