Check return value from readlink.