Yeah, this looks a lot cleaner. In general we should care whether something is the exact resource we want or a symlink to it. That implies the use of stat instead of lstat. (Said another way, only use lstat if you really do care whether something is a symlink or not. We don't.)