Test: cts-cli: use secure temporary files and remove them
Previously, the test would leave files in /tmp.