switch to binread for marshalled data

There is an issue with using IO.read on windows, where data is sometimes truncated, so it's preferable to use IO.binread.