Fix bug where sometimes pytest would use the file system root directory as :ref:`rootdir ` on Windows.