fix post-receive hook to support bare repositories

Bare repos have a shallower hooks directory, resulting in the repo_name to be incorrect.
Merge pull request #84 from mattbailey/patch-1

fix post-receive hook to support bare repositories