ensure the target directory is available when installing the hook, fix #154