rewrite readlink

Signed-off-by: Far Tseng <farrrr@gmail.com>