Refactor helper method out of getSourceFolders

Preparation for new method getExportFolders.