fix tests, fix impl, don't allow removing dirs that have children to
aprevent orphan dirs/files