Avoid opening files with deprecated 'U' mode (#269)

Opening files with 'U' mode is deprecated. When running tests with
Python warnings enabled, the warnings of the following form are emitted:

  DeprecationWarning: 'U' mode is deprecated
    return open(name, 'rU')

To open files with universal newlines on both Ptyhon 2 & 3, use the io
module. It defaults to opening with universal newlines and doesn't emit
a warning.

https://docs.python.org/3/library/io.html

> When reading input from the stream, if newline is None, universal
> newlines mode is enabled.
2 files changed