Fix saving of results in cache for the perf/libperf commands.