Make rebuildstaging url fixer more robust

@dannyroberts