change open mode to 'rb'

the default open mode is 'rt', which can cause problem when meet 0x0a data in windows platform.