updatecache: Moved shell escaping into transcode() function