Update worker.py

Replace Invalid characters with placeholders so we don't explode.