clean-up directories before update