Ensure URL for builds and tests is properly encoded (#35)

This fixes issue #35. 
It's not listed in https://docs.python.org/2/library/urllib2.html, so I don't consider it a public method.