fixed bug #12 - dict free failure with empty strings
+ refactored dict_setindex