Fixing iframe size in IE 7.
Improving browser detection.

Browser detection is now done by an external user agent parser library.
On IE, the document mode is used rather than the user agent.
Using process.exit instead of the natural end of the process.

Before calling process.exit, we are now waiting for stdout and
stderr buffers to be empty (with the drain event) so that the content
is not lost.