Be a bit more defensive about how dict is loaded

When config is loaded but dict is not, these situations aren't properly
checked in code, resulting all sorts of weird memory access errors, more
strict checking could avoid these.
Merge pull request #38 from jjgod/master

Be a bit more defensive about how dict is loaded