fixed an issue with the link generator function incorrectly lstripping folder names