Fix flake8 errors and add tox flake8 tests

Change-Id: I970c75fb6859a9c186636f111ac1e97b253e591c