Fix bug where sometimes pytest would use the file system root directory as rootdir <rootdir> on Windows.