sh doesn't deal correctly with escaped backslashes. The following snippet
should put an escape before each end of line but the sh is botching it
before it gets to sed.
# `sed -e 's/$/ \\\\/g' $change_msg`
sed: 1: "s/$/ \/g": unterminated substitute in regular expression
It should pass s/$/ \\/g to sed but it doesn't.
A fix has been applied.