update to replace_or_add bundle

$(line) is used in a perlre for a lookahead which means it fails
to work correctly if it contains perlre metacharacters. This
fix implements perlre quotation (\Q and \E) of $(line).