Refactors dtest.py log copying to be it's own function that tests may call when needed.