Something of a dirty KitKat workaround

Opening and closing the stream is now done off the UI thread, so that
these (now potentially long-blocking) calls don't freeze the device.