Iniitialize repo before first rsync.

* Also some fixes to properly handle rsync followed by git.

Fixes #9