Added smart page numbers

Smart page number find the last page created and make the new page the
one after that. They also check to see if they were added in a previous
run.