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

Must confirm the repository exists before adding the repository to the build.
Merge pull request #716 from dylan171/master

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