qibuild.ctest: do no crash when writing xml fails

This can happen if a test generate enough output to
fill all the available RAM

Change-Id: I21aadd618a9ec114efaa66a4af85156fc1fcff4f
Reviewed-on: http://gerrit.aldebaran.lan:8080/16660
Tested-by: gerrit
Reviewed-by: dmerejkowsky <dmerejkowsky@aldebaran-robotics.com>