There are 2 changes here:
- Use system sed instead of the sed found in the user's path. This fixes this script in the case the user has gnu-sed in their $PATH before bsd sed since -i '' isn't compatible and you need -i instead.
- set -e in this script so it fails as soon as one of these commands fail instead of throwing errors for each file if they fail
Since this is only ran on macOS, and we're already using this
absolute path below, this seems like a safe addition