made file_attribs and dir_attribs recursive flag act on files or dirs exclusively