unparse_ast tests, fixes

What the description says.

I don't like the elseRec function polluting the namespace, but I didn't have any better ideas on implementing it. It would be possible to do this as a lambda, but the resulting expression would be quite ugly.