Make api.py more modular (WIP)
Fix validation of arguments for register
Rename old register.py to adapter.py

Move to main package directory. Fix imports and setup. And some pep8 fixes.
Forgot to fix some imports after renaming
Convert adapter code to a class
Move RegisterException to api module
Use new class based adapter code
Fix logic error when analyzing logs
Add test for analyzing logs
Fix two bugs in adapter.get_code
Add tests for get_code
Change compressed files to contain 'main' module
Fix handling of tarballs and zips
Fix tests to use new compressed files
Fix register code to use adapter class
Fix post example to pass name of file