Adding support for S3 region/endpoint configuration

Closes #16