Fix (hack) serial port being attempted opened multiple times

Caused wierd failures when attempting to upload multiple times in
one session.
The lifetime of the serial connection was way to low before, better
now, but really the runtime code needs to be moved into a stateful
class/object, and given some encapsulation love.
Fix (hack) data handler for serial port being attached multiple times