Changed tests to use subprocess.