Support for configuring repositories in tests.
This is a pretty important new feature in the test suite, which is to construct a remote repository on the fly as part of the test suite. The general principle is that you create a directory full of folders for all of the packages you want available in the repo, and then the 'withRepo' function will initialize this into a secure repo you can do tests with. Fixes #4016. Signed-off-by: Edward Z. Yang <firstname.lastname@example.org>