Insert appropriate amount of backslashes
Update sed command line options

The version of sed on our servers doesn't like "-i ''", it thinks that
"''" is another file name and then complains it can't find a file with a
blank filename.