Freeze taken AST in escodegen.generate tests

Close #194.