Make inplace sed use a little safer