Change stat to lstat.

Fixes an issue when a walk encounters symbolic links, using stat() they
appear as undefined in the resulting array.