Add attachConsole option.  Fix bug in filterHeaders.

I found this option very handy when debugging strange behaviours during prerendering. I hope this can help others.