Added a section of text about using the with construct.

The `with` construct is the preferred way of reading and writing
files. Among other things it ensures that the files are closed
automatically. I also wrote it in a python 2/3 agnostic way.