changed get_env to qgetenv to avoid odd naming conflicts with builtin getenv. CWD is no longer a stored variable, now using UNIX's gecwd(char *buf, size_t size) to get the cwd