Added filtering for resource directories.