Another attempt at fixing sed for both linux and Mac