breakout stdio init to own files
fixup some reentry issues in posixio