`rootpath.detect()` runs infinitely on MS Windows if `pattern` can't be found. The used detection of the system root seems to be non-portable. Potential fix: https://stackoverflow.com/a/12041606