posix: rudimentary ptsname and ttyname implementations