Fix pre-commit checks for Mac OS users.

And update the pre-commit Gem.