Small refactor in symlink path method and add some tests for it