main/clang: improve code to replace python shebangs
This fixes the shebang of git-clang-format and other tools which do not have a *.py file extension.
Fixes #12975 (closed)
This fixes the shebang of git-clang-format and other tools which do not have a *.py file extension.
Fixes #12975 (closed)