fix various issues in copycontent.py run script