itemsPerPage filter sometimes gets a string

Which breaks the calculation of the end variable as the + sign then concatenates the string instead of adding as a number.
Merge pull request #38 from tw1nk/patch-1

dirPagination: itemsPerPage filter sometimes gets a string