A workaround for BSD sed/awk on OSX

This looks for gawk and gsed. If they exist then use them
in preference to awk and sed.

On OSX, you would want to do: `brew install gnu-sed gawk`