Correction of passed buffer size to readlink ...

... and verification of returned result by readlink for issue #2304

https://github.com/cocos2d/cocos2d-x/issues/2304