removed the dependency on filesystem
barf if no port is specified
connect the espruino before attempting to send the commands
move the errors to a finally block
move all of the on error handlers to the promise chain