Update worker.py

Modified code so that it will work on windows systems