Refactored mime type replacings.
Merge pull request #264 from xi-project/mimetype-to-extension-refactor

Refactored mime type replacings.