Close streams in tests better.