Update applyPatches.sh to work with Mac OSX(only)