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.
It seems like these assertions are now missing. Shouldn't we maintain something that makes these same assertions?