Fix namespace bug in write_directory_tree(max_manifest_depth=0).