Fixed an error which caused matlab to relaunch repeatedly

A com object was being repeatedly instantiated which caused matlab
instances to be repeatedly launched when there wasn't a previously
launched "matlab.exe -automation"