Bug 844726 - Save screenshot on exit

I want to do more testing before landing, and find a way to get rid of the 1000ms hack if possible.