Fix threading issues in refresh_dev_names - KeyErrors on threaded dev_appserver when MEDIA_DEV_MODE = True