Added a pre-commit hook and updated the readme with instructions