fix(contrib/ec2): add json extension to cloudformation template

The CloudFormation Template has a .template extension although its a json file.
This makes it difficult to parse/edit it as editors dont recognize it as JSON file.
So added the .json extension behind its name and also updated gen-json.py which
uses it.