If no file type can be inferred, this attempts to read the first line of a file and extract a shebang, which can be checked against a known list.