Autodetect MIME type based on file extension