I'd use Radek's suggestion. Create a portal, move a few paces away, and then cast teleport. You either end up at the original spot or the spell fails.
Saves the trouble of loading the city, then reloading the wilderness, and then casting the spell, only to potentially spend the time reloading the saved game.
But your approach will work, so if you want to use it, go right ahead. I won't stop you