Safely execute maya commands inside the threaded openPort.

Using maya.utils.executeInMainThreadWithResult because normal
maya.cmds are not threadsafe.