Fix for invalid hasRead warning

Added a new method to the IOHandle class called isInput(), which returns
true if the handle is valid for hasRead and doRead. Perhaps this should
be changed to something like getMode() which could return an appropriate
K3::IOMode describing the handle.

The Endpoint constructor now checks that its underlying handle is for
input before refreshing its buffer, fixing issue #7.
Merge branch 'master' of https://github.com/DaMSL/K3-Core