Refactored: Check for empty folder in separate script.