fix getVersions() for sub directories