Fix transformer with echo; use filestat() instead of perl; remove unused cruft

Do not pass the echo command as a string operand to the shell. Instead,
use $(G.echo) directly, which will work cross-platform.