Fixed problem with repeated serial ports

I'm now using a set object to contain all the serial ports
tested for connectivity.  This avoids problems with repeated
serial ports.  I should really be using a while loop in
get_cgr() instead.