GCS Uploader: prevent crashes on repeated use

On OSX when using the bootloader multiple times when
unplugging the device between (instead of clicking
boot), the open command locks up the GCS. This makes
it close the previous handle first.

Ideally an unplug event would trigger the close, but
the hooks are not easily available.