OpenBazaar/OpenBazaar — pull request #962 by Renelvon (2014-11-08 23:10:36+00:00)
Title: [WIP] Groom migration scripts.

### Motivation
Fix issue #956.

### Changelog
* Use context managers aggressively.
* Groom imports
* Install a `main` function in every script.
* Fix processing of `sys.argv`.

### TODO:
* Use `argparse` instead of messing with `sys.argv` manually.
* Print an error message if neither `upgrade` or `downgrade` are given as commands.

@lolosk: Please review. If you like to do some of the `TODO` work, do a PR on my PR.