lots of updates for sending photos to Amazon S3, and script improvements