Fixes and optimizes removal of data directories