switching load/dump to safeLoad/safeDump, closes #510