Fix intialising a repository from the hook.
Fix file modification detection for merge changesets that added new files.