Move readlink check inline.
Replicate readlink check into rbenv-hooks and rbenv-init as well.