Update iohandler.py

Updated to work on Windows.