Fixed directory cleanup