Make one last tweak in build_url, and add a test.