travis-ci: drop python3.2 from tests
tests: clean up some file closures using "with" statements