hooks/pre-commit: make it work properly in test environment
When running tests, the various tg directories are redirected back
to the directory of the freshly-built tg.
Make sure TG_INST_HOOKSDIR points at the bin-wrappers subdirectory
rather than the directory containing the tg executable itself.
Add a wrapper for the pre-commit hook that sets TG_INST_BINDIR
to the directory of the freshly-built tg and make sure that
the pre-commit hook now groks a TG_INST_BINDIR setting.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>