Don't let "/root/a<tab> kill the REPL.

Fixes the bug discovered by @vtjnash because `isdir` can throw/error, pokemon-style.