switched order of parameters for paginate_xpath. Also brought unit test up to date with a change in the caching behavior