Versions

I've added a cli interface to the versions API already defined in version.py.

Since this added a lot of arguments, I've changed from optparse to argparse and used subcommands for grouping the options.