Fixes for the single-project-clone case
Created originally on Bitbucket by davidnorth (David North)
Was already merged in Bitbucket before import, marked as merged by the import user
In the case where the entire repo contains one project at the root, this restores the original behaviour of naming the clone after the project. This seems necessary to avoid an exception. Apologies for the proliferation of pull requests!