Reset codepage to original value

In #1431, it set the codepage to 65001 for unicode support.

This breaks vim, as vim doesn't have decent unicode support in Windows. This
especially breaks vim in ConEmu and Windows.

This captures the last codepage and resets it, which should solve the issue.