add last class back to last node of folder structure