Adds URL-escaping to buckets, bucket types and keys 

URL-escapes buckets, bucket types and keys in methods that generate URLs. Adds (the first) unit test and an appropriate <code>Makefile</code> target.

I didn't sweat the 80 character-per-line rule because it's broken often in this file.