test-remote-communication: close pipe and check for errors

exit(2) on error
robot-framework: Add test for remote comm failure