Fixed Amazon S3 URLs not being URL encoded.

Fixes a bug where Amazon S3 generated file URLs were not properly encoded.