cast kernel cwd to bytes on Python 2 on Windows

Popen on Windows Python 2.x apparently cannot handle unicode cwd. use
filesystemencoding if defined, fallback on ascii.

closes #3039