Support shell.w32 environment when searching for vars

The $0 variable within shell.w32 uses DOS-style backslash directory
separators, so formatting the 'vars' path relative to the program
location requires special handling.