fixing incorrect use of lstat

Signed-off-by: Gabriel Andrade <gabriel@b-datum.com>