Avoid to compile regex several times

A (very) small improvement to avoid compiling the regex each time.
Merge pull request #23 from jgrenat/patch-1

dirPagination: Avoid to compile regex several times