Mime type support from local files and other fixes.