add comIO code

Code for abstracting file descriptor input and output. Includes main for
testing behavior. Reads and Writes binary data.