handle symlinks in size calculation