add cwd parameter to hook
and default pre-/post-commit and commit-msg to use the repositories controldir.