Added check on toHTML to only output non-empty directories