Use universal sed switches. OSX specifics removed.
Clean up file instantiations.