Update all repository.py tests for user template

The user template addition in Mark's branch causes nearly all
repository.py tests to fail due to mismatches. These have now
been corrected, though some tests are still failing for other
reasons.