Remove uses of deprecated System.Cmd functions