Write to document that works.

For some reason open, write, close fails in IE9+ in standards mode.  write,
close (ie with an implicit open) seems to work in IE8+ standards mode.

Added grunt and some tests.