fix compile warning about unsigned len check
fix errno suppression

undo errno overwrites in places where the OS has already properly
set it or where it is otherwise not appropriate for shadow to
stomp on it.

fixes #223