Use test -r instead of test -e for solaris. Fixes bug #4253.