Make sure we serve the right MIME type for file types the UI depends on,
no matter what the Python mimetypes module (which we now only use as a
fallback for performance reasons) thinks.

This should fix issue #370.