safer filter of ls output