fix post-receive hook to support bare repositories

Bare repos have a shallower hooks directory, resulting in the repo_name to be incorrect.