fix mime_type for files with spaces