[DDMD] Clean up useenv

As `executecmd` is only ever called with `useenv == 1`, we can get rid of some of the mess.