Make root_dir logic more robust/cross-platform
Merge pull request #7734 from basepi/minioncaching

Make root_dir logic more robust/cross-platform