create node settlement extension

This extension can be used to decide where to attach a newly created
node.
I will not create the dm variable, because it is only used once. I'll follow your advice for `$path`, though, the result is readable enough I think.