Fix hook not being written in case hooks directory is missing

Alexander Lohnau requested to merge work/alex/git_hook_fix into master

The hooks dir is not required in a valid git config. On my setup, it was either missing in one project or I have manually removed it some time back

Merge request reports