Fix for permission bug: check user permissions on treenode interpolation

When adding new treenodes in an interpolated fashion (pressing Z) no
permission checks were made. Thanks to Ingrid Andrade for making me
aware of this. The problem is now fixed and a permission check is made.

A regression test has been added to the fix-tests branch, which will be
merged shortly.