git hooks: use 'git rev-parse --git-dir', not GIT_DIR

GIT_DIR is not guaranteed to be set in newer git versions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>