Improved error reporting in xio and Spinning Loop getrandombytes

Clearly I'm failing at the github use... 

I'm accustomed to using git-svn at work, which has a different work flow (simpler, for sure).

My workflow has been:
1) fetch upstream and merge my master
2) branch from my master
3) apply patch(es)
4) merge back to my master
5) request push

I think this is incorrect... because you end up with a pull request that contains multiple commits (for various issues).

There are only two patches below, for two issues... But they should be in separate pull requests.  This is messy.

Improved error reporting in xio
and
the spinning loop issue with generaterandombytes.

How portable is strerror? Assuming it is... This patch provides more robust failure mode reporting in xio.                                   

Pre patch:
curvetun[15819]: ioctl screwed up!

Post patch: 
curvetun[15819]: ioctl screwed up! Operation not permitted.