Improve repository creation to not use the working repository.