I believe the "filthy rag" is misconstrued. Isaiah seems to be referring to what men call "good" is to God a filthy rag. A great example of this, in my opinion, is abortion being good and right as it is a woman's choice. Meanwhile, the Bible notes several times that we are to look after orphans, the fatherless, and widows. We are to learn to do what is right, seek justice, and defend the oppressed. We are to love the foreigner and the poor, giving them food and clothing.
However, we should not take pride in doing this, as we are only worthless servants doing as we ought. I find that no matter how much I give, I could have given more. I love that verse, "Lord I believe, help my unbelief." Belief doesn't pertain to me, as I know, but change the word "belief" to almost any other and it fits me to a T. "Lord, I give (sometimes); help my non-giving. Lord, I love, help my not loving. Lord, I am patience, help my impatience. Lord, I am sincere, help my insincerity." And so on. I'll bet I could go through every adjective in the dictionary and find I am lacking in all of them.
Another point you addressed is that we are called to be perfect as God is perfect, which is impossible for us. The Hebrew etymology of 'perfect' is best translated "complete". People might shrug at "perfect" thinking that "perfect" is impossible and therefore is silly to strive for. However, "incomplete" is within our reach. We can work to become more complete in our generosity, patience, sincerity, etc." Working towards completeness is not working for salvation/redemption/heaven. Salvation and redemption are God's gift to us, no matter how incomplete we are. Working towards our own completeness is our gift to God.