Fixed to use "is" not "ok".

  The value compared against is now tested.
  Only call $cfg->set if $cfg is present.

  This should always be safe - but the test-script(s) don't necessarily
 setup a valid Templer::Global object.