Fix prepare-commit-msg hook and replace in-place sed