Remove pylint config.
Add 'flakes' target invoking pyflakes, and fix some pyflakes warnings.
Add pep8 make target and fix some pep8ness.
Ensure that we close all files. Add close methods to appropriate classes, and
make classes that have close methods in to context managers, so that they can be
used with `with` statments.