Added check for mac vs other unix for sed command.