Windows fails with an OSError when `somepath.resolve()` is called and `somepath` contains a glob pattern. As a workaround, we now `resolve()` the parent directory, and put the filename at its end. This only works when the glob pattern is in the filename, which is the case for BAT- generated globs.