factored out grep_word from expand_query
Merge pull request #47 from rwhaling/master

factored out grep_word from expand_query