Fixed issue in paginator

rec_end() returned wrong value if number of records was not 1 and last
page contained one item.

Closes #470