Update sed command to work on both gnu & bsd sed's