Fix stat/lstat error checking in a few places.

closes #6929. Please review.
@erikh well since we error out anyway if it's a symlink, why do we care about whether the symlink points to an existing file or not? I think we could remove the Stat (from lines 887 to 890), and just use Lstat.