Add attachConsole option.

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