repository: Fix test writing into the source directory
I've recently noticed that tests sometimes leave behind an empty full
directory in the repository service package. This is caused by a bug in
one of the tests for cloneFromURLCommand()
, which clones a repository
into a relative path. As the command's context is immediately getting
cancelled, whether or not the directory exists is subject to a race
depending on we kill git-clone(1) before it's created the target dir.
Fix this bug by instead cloning to a temporary directory. Parallelize the test while at it.