Posix mode was setting output files as read-only.

When I switched to using posix IO functions, I made the permission
mask too short by one digit, resulting in user permissions being
set to zero.