Add flake8 running to pre-commit hook.

Couple of fixes thereby.