Resolve issue #3

Now able to append nodes and attributes correctly.

If $tag is set, create a new node and update $parent, but
revert to old $parent at end.