Finished OS X file I/O implementation