Isolate UNIX dependency, add opendir/readdir/closedir bindings