Added path to megatest executable to PATH in the setup-for-run call. Added filters for envvars and ability to override a specific variable

Do not merge this in until it is bug free! Problem with env vars?