Detect the MIME type of source files