Correctly write and restore the console title on the stack (fixes #1782)
Merge pull request #1790 from rg3/console-title

Correctly write and restore the console title on the stack (fixes #1782)