You have put yourself in a bind if you have already done a lot of work.
If not, then you should use friendly url (for a few static pages) they will be the same no matter what the tabids turn out to be.
I would also suggest that you use the dnn url generating method like
DotNetNuke.Common.Globals.NavigateURL
Take a look at the souce of the above to see if you can get a better grip on what you need to do.
Dnn pages are stored in database so publishing a site is not as easy as clicking on publish. I think this would be a great module to do, something that would sync the production site with the dev site.