Fixes the issue with symlink

This should fix the symlink issue i reported earlier ... instead of os.stat using os.lstat (follows the symlink)