Encode URI of filename before uploading to S3.