Python 3 compatibility
the second argument to dump should be optional just like in pyyaml