Fix two tests that fail when coverage is enabled

This test would only fail if you ran with coverage enabled. I rewrote it so that it is more of a unit test and so it doesn't write out temporary files which was causing coverage to encounter an exception.
There shouldn't probably be some assertions here.