Add 'upgrade' command: fixes #3