pre-commit.git.sh: Make script more portable

See https://wiki.ubuntu.com/DashAsBinSh#A.5B.5B
Merge pull request #2 from TimothyGu/patch-1

pre-commit.git.sh: Make script more portable