Fix bug in overwriting existing hooks dir