Fixed a couple of bugs.

The first was that the Unity program would not automatically reconnect
to the Pi program.
The other was that the Unity program would hang when the Pi program
wasn't running.