Added compatibility with passing S3 url for the template instead of a local file

Hopefully others will find this modification useful when dealing with template files larger than the file size limit amazon imposes on uploading the template contents as a json string.