Execute pre-receive hook

This patch work in my project.
I think that use this test is better that "try: ... catch".