#1402, port malawi copy script and fix testing framework
Ported malawi copy script from v2 to here. In the process updated some of the testing code as the tests weren't passing, and were brittle. The tests still aren't great, but re-writing them is out of scope here.