The script wrote the hook to .git/hooks, which fails when .git is a
file rather than a directory, as in a clone made with
--separate-git-dir. It now asks git for the hooks directory with
`git rev-parse --git-path hooks` and creates it if missing. In an
ordinary clone git answers .git/hooks, so nothing moves there. Where
core.hooksPath is set, git answers that directory, so the hook now
lands where git runs it instead of in .git/hooks, where it never ran.
Model: opus-5-5