Move getnodename to common/hostlist, function is equivalent to gethostname, but strips off everything after first "."