The 'ls' test that the s3 uploader tries is lame. Even if permissions are good, and it would be able to write, the script stops. A better test would be to actually try writing a file to the requested destination.