src/tests/pathname.c: properly check strdup() return value

Fix the check for strdup() running out of memory.

Reviewed-on: http://gerrit.openafs.org/8880
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit d9cc9c9dee9ad0213ddd39174e81d01b9707937b)

Change-Id: I56dc0dd7ced4df5be636a03db819169b5413e56b
Reviewed-on: http://gerrit.openafs.org/9514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>