Don't allow insert_{before|after} root node

This can be changed if support for node lists is added to the public API.
Merge pull request #220 from nwellnhof/node_insert_fix

Don't allow insert_{before|after} root node