Do not try to set workdir when repository was not created
Correctly initialize git_remote_callbacks
Fix clone example