Read in whole template at once

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>