Make the repository handler an actual handler.

This will allow easier implementation of command line arguments and
actions other than just 'update' (which is the only behaviour at the
moment.)