add pre-commit hook (fixes #12, fixes #14)