Create and use waitForUrl()

This is much less flaky than our previous hack. We can tell more
reliably when our uploads have completed.