lib/fs: make dir_empty() more reliable

there's no need to "parse" the output of ls