Tweak handling of template files for SGE configuration.