Add ability to get file extension from mimetype

Change-Id: I3da7be2a09c1506af72af85cd5acf5df27455a23