Convert url str to to 'utf-8'

This is to try and overcome

Type str doesn't support the buffer API

which is a feature of Python 3 failing early, rather than later, to make
string encoding problems obvious.  It hasn't succeeded as that message
was all Greek to me.