NaCl fixes

This is largely a simplification to use the new nacl_io module which makes filesystem access much easier.