Fix replaceTagInStart when using stdout as GCode output.