Add method to load all factories in given dirs.