Better error checking when editing repositories.
More explicit tests.
Merge pull request #19 from square/jkingdon/better-errors-editing-repositories

Better error checking when editing repositories.