Added function to get mime type from file extension