Copy stdlib code into posix.lua, minimally modified

Solves the discussion in already-closed issue #80, and closes pull
request #88 and closes pull request #89.