fixing return value logic in rmdirr()