Add cast to string on binary mode check.
Add cast to string on binary mode check.

onehub/fakefs,vhl/fakefs,pivotal-cf-experimental/fakefs,anthonyryan1/fakefs,defunkt/fakefs,deployable/fakefs,1234-/fakefs,dekz/fakefs,marxarelli/fakefs,bquorning/fakefs,fakefs/fakefs