Only report not matching stderr content when we look for it [v9_18]
The previous test code could emit "D:cds:stderr did not match ''" rather that just showing the contents of stderr. Moved the debug line inside the if/else block.
Replaced backquotes with $() and $(()) as approriate.
(cherry picked from commit 304d33fb)
Closes #3437 (closed)
Edited by Mark Andrews