Fixed possible infinite loop when using Python 3 to merge pages

Merging pages multiple times on the same page objects might end in a infinite loop, because `tok` might be a empty bytes object.