fix directory removal quirks