re-construct directory hierarchy