Well, unfortunately now that you've got it working it's probably not what you want anyway
On my system, pressing tab gives me a list of "executable" type files that seem to come from a slick command path_search, not just the current directory as you would get on Win XP "dos box" cmd.exe thing.
The fact that you're getting directories only might be a bug - in process_tab it calls maybe_list_matches with a prefix of "dir:" or "f:" for directories or files, but maybe_list_matches ignores this prefix as far as I can see.
Graeme