Fixing "sed: RE error: illegal byte sequence"