Iniitialize repo before first rsync.
Iniitialize repo before first rsync.

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

Fixes #9

firebitsbr/idb,dleyanlin/idb,dmayer/idb,hankbao/idb,dleyanlin/idb,dleyanlin/idb