Add ensureBuffer helper for nodes.

I want to use this for two file out style web nodes I am writing and I think it belongs here.
-Mark.