BearCollectorTest: Close filehandles

This makes all tests pass on windows.