use internal rm command for removing directories