Delete directories before radically changing their contents.