Get things working correctly with base OSX sed