Reconstruction of the directory structure