Fix #785: Fetch scenario blows up when branch name matches folder name

I changed the branch test to have this condition, such that it is broken without this change (https://github.com/KuduApps/RepoWithMultipleBranches/commit/b4bd5b73ec4c15019d41d16e418c3017b70b3796).