Replacing StringIO tempfile with a simple list of lines.

This fixes an unicode/string error I got on python 2 after I added the
'from io import StringIO' line that python 3 needs. Now we don't need StringIO
(especially not for a script file with 10-20 lines or so).
Checking for sys.exit() presence before injecting it. Buildout 2 already does
the right thing.
Different print() style to get it working with both python 2 and 3.
Removed couple of 'generated script' lines as buildout 2.x doesn't print that
anymore

(It doesn't print it anymore if the file hasn't been changed, that's why).
This change doesn't impact the test as such in a meaningful way, so that's fine.