cmdline: be a bit more picky about a failed getcwd