Fix regression: build will fail if empty repository is added.

Must confirm the repository exists before adding the repository to the build.