Enhance git-hooks/pre-commit
Ensure file exists and is non empty before parsing it

Otherwise the subsequent test command was throwing an exception
that the left hand side of the expression was empty (for empty files
being added to a repository).
Add mechanism to link custom hooks to the default Git templates
Fix the empty file check conditional