Make "invalid lines" test more readable.

Use Tempfiles for testing instead of stubbing.