Added --flatten option for use with s3 cp and sync commands

The flatten option will flatten a directory tree such that all files
copied or synced from the source directory will be copied to the root of the
destination directory specified on the command line, i.e. any sub-directories
under the source directory will not be recreated on the destination side.

This is useful for copying or syncing the files in an S3 bucket but without
recreating the directory tree structure under the source dir. Obviously the
filenames should be unique to prevent overwrites.

Note that when the flatten option is used with sync the sync'ing is only
performed in the forward direction, i.e. from the source directory to the
destination directory.