ash: fix ${var/s/r} handling, add testcase.

3 files changed