added code to delete temp dir