Fix bug where pre-commit script only work when committing from the git root