Fix compatibility with Mac OS X

OS X's default `sed` doesn't support the `-r` flag, and gives this error when trying to use dwim:

> sed: illegal option -- r

This can be fixed by installing gnu-sed from Homebrew or MacPorts, but the binary name for gnu sed is `gsed` to prevent conflicts with the system version.
This change will use `gsed` if available, allowing it to work on Macs that have gnu sed installed.