Make sed do -i '' on OSX

I don't have access to an OSX machine, so if someone could test this that would be great.