Add tests/ to flake8 and fix existing issues

Signed-off-by: Don Naegely <naegelyd@gmail.com>