Fix the rules for stex generation

This wasn't working when I did something like

  \include{examples/example1.tex}

because I just had the rules wrong.  It's fixed to work correctly now.