Adds uname check for correct sed flag.

Fixes the sed error on OS X - of course the `-r` flag is called something else on Darwin. *Doh!*