tg.sh: respect core.hooksPath mostly
Git version 2.9 introduced the core.hooksPath configuration
option. However, the interpretation of non-absolute paths is
terribly ill-conceived.
If Git is at least version 2.9 and core.hooksPath is set to an
absolute path, assume that's the correct location of the hooks
directory instead of $(git rev-parse --git-common-dir)/hooks.
The $(git rev-parse --git-path hooks) command does not work
properly with core.hooksPath until Git 2.10 so it's not used and
it's unclear what its semantics with a relative hooksPath would be
anyway so it's best avoided.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>