Code-only repository manipulation

This is the beginning of a *long* pull request to add repository manipulation without resorting to the file-system. I plan to use that to alleviate the use of fixtures in tests (as well as, erm, adding *moar* API ;-)).