Correct mode argument for compatibility

Correct mode argument for compatibility with Python 3.2