dirPagination: added test for Array in itemsPerPage filter

It was causing errors when the collection was the result of a promise,
and therefore initially undefined. Cannot call `slice` on undefined.
dirPagination: HTML encoded forward and backwards arrows.