Implemented Node:appendChild

Hi Craig,
I re-implemented appendChild along your lines of thinking.
The implementation is much simpler. :-)
Please review and pull if deemed better.
I don't think this check is mentioned in the DOM spec, but JavaScript throws `"TypeError"` for this. I'd prefer to use established names if possible.