Fix global variable usage

In particular, correct the call to rl_completion_matches() to pass
'word' as the first argument instead of the non-existent 'text'.
This is important because calling that function with a null first
argument crashes libedit.
Merge pull request #1 from mkfmnn/master

Fix segfault when using libedit