run-command: treat inaccessible directories as ENOENT