Fixed bug: The function summarize_dirs did not work.