Add expected pep8 violations output and fix up mocking of Popen in tests.