Should I trash a program after "Test Run" and then "Scavenge"?
No, when you Scavenge the Magnum Opus and reinstall it, it's considered a new copy of that program, not the same one which was installed originally with Test Run, which no longer has a valid target for moving to the top of your stack at the end of the turn.

See 8.2.10 in the NISEI Comprehensive Rules:


  Whenever a card is uninstalled, there is no memory of its previous
  state, and it is considered to be a new copy of the card.