[pre-commit](https://pre-commit.com/) automatically runs tools like
linters and fixers to make development easier. This change adds a simple
pre-commit config file with an example trailing whitespace fixer and
applies it to the existing project.
Additionally, don't ignore the lib directory (an error introduced in #8).