webrtcendpoint: Remove tmp directory without using system and rm

Change-Id: I67d8f2cfdffbb4d2e7ae97fc70d008f5b699d45d