Changing default url to buildbotURL, if it exists.

This sets the default to using the c['buildbotURL'] if it exists. if not, it resorts to the localhost one.
However, you could simplify (shorten) this substantially while still keeping the tests passing.  For example, you're checking whether the port is set several times, and checking whether url is in www_cfg several times.