Fix hooks perms.
Add post-checkout hook.