Fix tab-completion of empty string

Closes #301
Merge pull request #303 from glowing-bear/fixtabcompletion

Fix tab-completion of empty string
Add a few debug logging statements