Fixed bug in S3 sync script.