Flatten and upload a directory to s3 bucket