[client] Improve clone procudure.

* Set repo->worktree before setting repo->head.
* Don't check worktree on start-up if repo's head is not set.