Moved to use testInvocations as opposed to XCTests's setUp/tearDown

I think this works, although I'm unclear how to write a good test for this - this is supposed to fix the beforeAll problems in #401, but this would have to test that the test indeed failed