Fix Issue #1165 allows extensions to be set by certain settings

PAGINATION_PATTERNS was hard coded so that all files had a ".html" extension. This fixes that and add a test to
ensure that the pagination code is not changing the filename incorrectly.
Merge pull request #1191 from th3aftermath/FixIssue1165

Remove spurious .html suffix. Fix bug #1165