Moved setting of various env vars to earlier point in time so they are available when the testconfig file is read. This means you can use MT_RUNNAME, MT_TEST_NAME etc. in [system calls