restore directories after build