Merge pull request #5 from alphagov/argument-parsing

Implement proper command line argument parsing
Cleanups to pass flake8
Fix missing import of 'os' in setup.py

This was "working" because of a bare "try: except:" which was hiding an
error.  Fixed that, too.
Move `to_json` and `base64` into a utils module

This will allow them to be used from elsewhere without importing all the
auth code.