Properly escape backslashes in prepare_command.
Have sed only inplace edit files.