updated fix_extension and fix_mimetype to be more specific