tools/dumpscan/pathname.c: properly check strdup() return value