Item11267: Changes to support git submodules

The "working directory" is different when a git hook is called from a
submodule,  so the lib path for the hooks needs to be adjusted.

Also, the githooks are installed into two different locations:
  Normal repo:     .git/hooks
  submodule repo:  .git/modules/<module-name>/hooks

git-svn-id: http://svn.foswiki.org/trunk@17831 0b4bb1d4-4e5a-0410-9cc4-b2b747904278