Improved mime type detection on mac and linux.