Get better mimetype checks
file -i <filename>
or cat <filename> | file -i -
allows checking for mimetypes in a much better way. We could potentially use it to check for mimetypes better, to keep out unwanted files (like executables).
It's rather fast-- on a 1897739b file, it takes from 9 to 13 mses on my laptop. I assume that it'd be significantly faster on the server.