Rework specs around completing '~'.

This is because if there were no files in '~', the previous test would fail.
So instead, check for directories (which are more likely).

Also adds a test ensuring directory completion functions.

=========

This was failing for me locally. There's still the edge case that there's no directories in ~, but that seems pretty unlikely to me.