Fixes for setEnvVariable inside tests - fix #80