Fix reading of user login name

Apparently DejaGnu had never before been run in an environment where
whoami(1) did not work, as the catch commands here did not actually
catch a failure.  The code here has also been cleaned up into a more
straightforward form that eliminates an unneeded temporary variable.
2 files changed