Generic method to load components from folder.