support safer version of load and dump[s] functions in yaml backend, and test cases for them