fixing sed inplace parameter for MacOSX