Use subprocess instead of os.spawnvp() to support Windows