MIME parsing updates

Some MIME types that include a semicolon (;) do not parse correctly. This fixes that parsing error and adds a findExtension method to look up a correct extension based on MIME type. The phpRepository class is updated as a result.