Infer file type and MIME type of any file/buffer
