This patch changes how pages are numbered in the Comics Manager. Each time you create a new page, a page counter is incremented and stored in the comicConfig.json. This means that if you create pages 1,2 and 3, and then delete page 2 and 3, then create another page, it will be numbered 4.
The way it was before, it would look at the "pages" list in the comicConfig.json, and go for the next free page number, even if that already existed on disk. In the example above, you would wind up restoring page 2 when trying to add a new page, after deleting pages 2 and 3.
There is still a possible minor corner case (with either method) where pages can get messed up, and that is when you import pages that conflict with existing pages, or what would be the name of future pages. I'll write another patch to prevent overwriting existing pages on import, that should fix this.