Don't suggest non-directories when tab completing cd

Fixes #1059