reconstruct directory tree