Ported script renaming for Windows from calcpkg; also fixed a bug in util.py.
Fixed additional wine issues in bxdebug; it's not perfect but it mostly works now.