Reconstruct directories hierarchy