Pass a string, not the type, to buildURL

This will make subclassing, munging the type, and calling super work
more sanely.