nexthostname command - fix

http://ralph.allegrogroup.com/buildbot/builders/unittest-ralph-andrzej-jankowski/builds/26