Provide a default `PATHEXT` environment variable.

Added test case which relies on the `PATHEXT` environment variable.