Yeah, search and replace is what I have done in the past. I would like to keep up to date copies on both my testing server and live server. Ideally, they would be two identical code bases in two different locations.
I guess I can consider this resolved, but I will post a solution if I can develop one. To be honest, I think I have used a similar statement for another project.