stat -> lstat

fixes issue where symlink directories were
reported as directories, causing fs.rmdirSync to
fail