MNT: Fix python2-3 issue in read_binary