Support checking executable bit without Git.
The check-shebang-scripts-are-executable hook already avoided false negatives in a Git repository by looking up the Git file mode rather than relying on the file mode in the file system. Git already automatically probes the file system for executable bit support. Use the file mode in the file system when we are not in a Git clone or it is trusted by Git according to its core.fileMode config variable.
Also, fix previously asymptomatic copy/paste bug in check_shebang_scripts_are_executable_test.test_git_executable_shebang exposed by the other commit. This test manually filtered executable files out before calling check_shebang_scripts_are_executable. This makes sense in the test it was copied from, check_executables_have_shebangs.test_git_executable_shebang, because the check-executables-have-shebangs hook only runs on executable files. However, check-shebang-scripts-are-executable correctly runs on all text files, so the test shouldn't filter executable files out. The test still passed because when git ls-files is passed no files in particular, it
lists all files in the Git repository that satisfy the given filters.
Closes #749.
@asotille, please let me know if there's anything I should change about this pull request.