I assume CGIWrapper is being executed by your web server. I now recall that
my server (Apache on Windows) does not pass in the environment it inherits.
All the environment variables that go to the CGI are freshly set up by Apache.
I don't know if there is a way around this. If not, use the ExtraPaths setting.
I think chdir() is appropriate so that the script runs out of its location.
I believe Apache does the same thing for CGIs. But there is a ChangeDir
setting if you want to disable that.