When opening logfiles, use io.open instead of open

* This allows passing in errors='ignore' which is unavailable to the plain open function in Python2.
* Fixes Issue #30