made rmtmp recursive and added safety confirm