Modify shell scripts to work on OS X.