Add templates dir to medic-core; add platform-independent ec2-metadata utility.