NixExprs: extract the `escape` function and test it

Created by  Graham Christensen  on March 17, 2021
S2KNQCPB22URM7BLFSMADPWPQGBOZWMYHBPIW4N6PNEFVDUTYWWQC
Change contents