Lint tests directory

Clean up style issues in the tests and start linting them as part of the build.