Added mocking of child_process for testing.