Fixed the resulting oops where Mac OSX didn't know about read()/close()