Attempt to fix a non-deterministic failure on Travis

Our theory is that the temp file object is being garbage collected
before the expectation is executed, which deletes the file on disk and
causes the expectation to fail.