I'm not too sure what you mean by changing infill direction. From what I'm aware the rectilinear/grid infills alternate direction to give you a cross hatch sort of effect. Secondly, "modifying" the Gcode itself for a different infill would be a living nightmare. You'd need to program each and every move it makes. I doubt you can't change infill settings, but even if that's the case just use a slicer where you can.