Fix the pagination issue

the insertBefore() method doesn't choose the appropriate pagination <li> because the method accepts only one parameter.
Merge pull request #10 from Guigoz/patch-1

Fixes #8