add support for embedded subshells in word tokens

The word tokenization function is beginning to resemble the complexity
of its inspiration.  Fixes #15.