Reverted some of 0b11522f2ccc170fde47af083d5c13e1df7876bb

The unprotected yaml.load in this file is a security risk: pyyaml
can run arbitrary code in yaml files when it parses them.

See:
http://pyyaml.org/wiki/PyYAMLDocumentation#LoadingYAML