Make AWS-S3 use the right directory suffix.

Fixes #1336.
Merge pull request #1369 from shrinandj/fix_s3_directory_suffix

Make AWS-S3 use the right directory suffix.