Move the setlocale call to the very top.
Move the setlocale call to the very top.

This change shouldn't affect the behavior at all, because the code in
between does not do MB<->WC string conversion.

rprichard/winpty,fracting/winpty,fracting/winpty,rprichard/winpty,rprichard/winpty,fracting/winpty,rprichard/winpty,fracting/winpty