note that mode is modified by umask (4.3BSD-tahoe/bin/31)