Moved last_page_check to the top of the do...loop

It was always supposed to be there. Now it won't skip the last page.
Science!
Merge pull request #41 from theVKC/master

Moved last_page_check to the top of the do...loop