Parse string representation of hash better

It used to be parsed via eval, which is unsafe and error prone. Now it
is parsed with YAML.load

http://stackoverflow.com/a/8614613