Fix unit test for reading a utf-8 file as binary.

This test was broken because webkit browsers report the request as a string
instead of a byte array. The string has to be converted back to a byte array
in such cases.