When using ln -s some links might be not found. Therefore, integrate os.path.realpath()
os.path.realpath()
See
https://unix.stackexchange.com/questions/196656/when-i-cd-through-a-symlink-why-does-pwd-show-the-symlink-instead-of-the-real-p/196753