changed the detection of unconfigured slave to master_host set to master_not_defined.  This is because we must not run reset slave all now if we want to keep the gtid set values
added a forgotten rm of tmpfile