Workaround issue cause by conflicting PATH environment variables

cmd.exe can have both a PATH and a Path environment variable; setting both
causes unpredictable behavior. We work around this by detecting the
correct path variable to override in shell_out commands.