Properly initialize the local repo in CLI's clone

Fixes #536