Check mimetype filenames better.