Fix issue which replaces _DOLLAR_ in the command with $.

Unfortunately the commands string is included in a new string. The $ doesn't get escaped. However, when escaping the $, it gets a double escape and so $ is still unescaped.