Fixed randomizing for user-pulldowns
Added debug logging of chdir() calls
Allow the root path to be set outside of the package

Allows a caller that has already resolved the directory to inform
us about it (and set it if the builtin autodetection fails).