log: tests: switch to a temporary file for outputs

Using a pipe to redirect the output of virt-log will lose his return
value, so use a temporary file to collect the virt-log output.