POSIX cat implementation