utils.attr()

A method that access an attribute on a node, removes that attribute
and returns the value. Makes code a bit shorter and reduces the need to
explicitly remove attributes.
unit test for utils.attr()