add :bytes to binmode dh, :raw as well

though perldoc -f binmode says :raw marks the data as bytes.
Confirmed this worked under ActivePerl 5.16.3 and Strawberry Perl 5.16.1 at hand (and will see for other versions of perl later).