Revert "Small fix for multiple symlink handling / better path reading"

This reverts commit 49820ad4a201ab73966f2d61e0adff2af7804aa5.
Handles multiple symlinks and works on OSX

Signed-off-by: Pierre-François CLEMENT <likeyn@gmail.com>