Update flake8 support, stop workaround for modern pyflakes

And use exec to capture the real return code.