Add endpoint option to S3

To support S3 compatible storages (e.g. Cloudian