We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we need encoding.strtolocal() to encode the result of os.getcwd().