made file_attribs and dir_attribs recursive flag act only on files or dirs.

The file_attribs/dir_attribs recursive flag did a chmod -R, which acts on all files and dirs. I modified this to only act on files or dirs depending on which function you call.