Pass env vars to prelaunch and postexit commands properly.