fix getMIMEtypeByExtension to deal with spaces in mimetype extensions