Use access() instead of stat() for checking whether scripts exist.
[tinc] / src / solaris /
drwxr-xr-x   ..
-rw-r--r-- 4408 device.c