More Python3 fixes

 * Fix NoneType usage
 * Convert byte to str when reading
 * Convert str to byte when writing