Convert to python 3

Running 2to3 and replacing string raises with ValueError raises makes the basic code useable under python3. (As in, it works fine with my use case afterwards, but I don't use features like graphviz output or SQL yet, so I cannot confirm that it will be fine for those.)