add support for ioctl on directories. closes #27
Merge branch 'dirioctl'