Don't try and rewrite the XPI on disk if it's already there and correct

With this patch we check whether the XPI temp file already exists correctly on disk before trying to write it out again with the XPI data.

This fixes issues if you have two projects running tests running at the same time on one machine (e.g. in CI), where previously they could end up fighting over the XPI file, and all the tests would fail.