scope files: give names to threads and make then daemon mode

(integrated from trunk branch change 044cc12 by Todd Whiteman <toddw@activestate.com>)