Fixed subprocess leak in tests, double checked cleanup.