Better error checking when editing repositories.

Although kochiku has validations in the models, the user interface is....lacking.

This pull request fixes that.
@robolson