PAHMA-979: fix introduced bug in uploadMedia.py; capture STDERR in trace.log