Add in getDirectoryTree condition to enable specified directories