fix opening files with spaces in the name and some mimetype changes