Fix the initial existence check for "repo"
Fix the initial existence check for "repo"

Commit 27226e742d7e1a3d371531c19a3fdd91a4f9ab4a introduced a warning if
"repo" is not part of the bootstrapped REPO_URL. However, that check was
done too early, directly after the call to _Clone. As the _Clone function
does not actually clone but it only initializes and fetches, the check
needs to be moved to after the call to _Checkout.

To reproduce, call

repo init --no-clone-bundle --repo-branch=master -u https://android.googlesource.com/platform/manifest

which will currently always show the (bogus) warning message. With this
fix, the warning will only be shown if "repo" indeed does not exist.

While at it, also slightly improve the code by using os.path.join().

Change-Id: Ied89e24231addabab6075005065748df1ffa74c4

aosp-mirror/tools_repo,aosp-mirror/tools_repo,TheQtCompany/git-repo,gabbayo/git-repo,mer-tools/git-repo,lewixliu/git-repo,lewixliu/git-repo,codetutil/git-repo,lipro-yocto/git-repo,GerritCodeReview/git-repo,couchbasedeps/git-repo,TheQtCompany/git-repo,codetutil/git-repo,couchbasedeps/git-repo,gabbayo/git-repo,GerritCodeReview/git-repo,chenzilin/git-repo,chenzilin/git-repo,lipro-yocto/git-repo,mer-tools/git-repo