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`

This is a workaround for the bug in #14 (which was closed
despite not really being fixed)