Clean pyflakes warnings

This is the code for https://bugs.launchpad.net/pyflakes/+bug/1311145

I used __all__ to silence the linter and included the pyflakes check into travis and tox suite.

setup.py fails on python 3... not sure if we want to make it compatible with python 3 or it should be done in a separate ticket.

Thanks!