Reformat directory tree using nested lists.