Rework lint output; tweak linter structure

The output for linting individual files and directories of files is nicer
now and more informative.

This starts tweaking the linter code to make it easier to test.