Use with statement

Files work nicely when used with [Python's context managers](http://docs.python.org/2/reference/compound_stmts.html#with)