Fixes bug where end of wordlist was sometimes encountered, creating null words

I encountered some instances where I hit the end of wordlist before attributeFor() was called to reset it. This happens if count($static_vars['factory']) > count($this->wordlist) when $this->wordlist != 0.

This change moves that responsibility to a getWord method, which always checks for count of wordlist before using it.