detect file type by reading the shebang line