The variable nodename is defined inside 'PERL' section only
and not available in template toolkit env, so we should check
variable 'out' here, as it currently contains the actual value.
The library has been created long time ago, while
we never used it previously, so the issue has been hidden here.
Change-Id: Iac3547fd60126456feea85d7bb5ffcdc6edb23a2