I added a test case. Without this change it loops forever.

If there is an existing directory let say with the name: 'a' and some creates a link as:
`ln -s a b`
then it dosn't start with '/' and doesn't start with '.'. But with this change you are saying, if the symlink doesn't start with '/' than it relative.