I'm sorry if you got the impression that I wanted to globally replace chmod, I don't, ony in this script. Though I can see where it could be useful in other scripts as well.
In which case you probably don't want to be confusing things by replacing chmod. What you want to do is a completely separate operation and should be called something different.
Otherwise you'll just confuse everybody. (Including yourself in 6 months time!)