Replace system calls and update tests

* Update tests with run_tests.sh wrapper
* Replace system calls with Python functions to concatenate and copy files
* Attempt to address merge failure with large number (>1000) of subsets