Added some error handling for a disconnected serial port

Should now fail silently when the serial connection to the Arduino is
down, and also attempt to connect to it when attempting to send data.