Foundation pagination: Do not navigate to unparseable page numbers.

Clicking on an ellipsis in the foundation pagination causes the user no navigate to a NaN page. Pull request now parses the page number in the item click event first, before navigating.

Fixes #22