Extended Mimetypes that detects the mimetype from a given file.
Imported source code from Mime Type Detection Utility that is licensed
under the Apache License V2.0. It is used for detect the mimetype.