added pre-commit hook and hook installer, resolves #401

Can I get some :+1:?