`insertFunction` now behaves correctly if `selector` argument is a DOM node
Merge pull request #3 from colingourlay/patch-1

`insertFunction` now behaves correctly if `selector` argument is a DOM node