dirPagination: fix issue with current pagination on init

This is from pull request 12
(https://github.com/michaelbromley/angularUtils/pull/12). I could not
auto-merge as I have since made other changes that would conflict, but
it is essentially the same solution, with a unit test to go along with
it.