Allow node names to be passed to getNodeName

This was required in my shell where the path arguments are sometimes relative node names,