Add tox configuration and bootstrap swstat tests

Pep8 target is working, but real unit tests remain to be written.
Fix pep8 syntax errors