Fix leaky tempfiles during test suite.

Each test run was producing 5 abandoned temp files.

Change-Id: I1c682b8e5a8782b1123b4a1bdb06dddca534e84b
Merge "Fix leaky tempfiles during test suite."