changed subprocess to invoke shell only on windows