use wstat in test command to follow symbolic link