Added the thumbnail feature for S3, fixed folder renaming for S3