Merge pull request #257 from kevinlli/buildfix

Address a couple of build script issues (windows related)
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.