Fix error handling in pioctl wrappers

We need to save the value of errno if we hope to do anything useful
with it, otherwise logging will scribble over it.
Release 0.2.2

Release 0.2.2 with pioctl wrappers that actually save errno