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.
Merge pull request #256 from vandenoever/utf8asbinary

Fix unit test for reading a utf-8 file as binary.
Restore the end point of selection range to where it was initially after
splitting boundaries.

Given the following selection <p>a[bcd]<span>efg</span></p> calling the
splitBoundaries at the moment moves the end point of selection to immediately after opening span <p>a[bcd<span>]efg</span></p>
this causes getTextElements (passing includePartial = true) to return
both "bcd" and "efg" which is incorrect.