Compile fixes for OSX.

Mostly changing "struct uio" to "struct uio*" and calling uio_create() as is required in Darwin. Note that the creation of a dataset will stall, but hope to merge this will latest before debugging the reason.