Get the subdirs from the rootdir
A rough prototype
A minor refactor
Build fix for release