fix xpath translate() function for RegEx special characters

Fixes Issue #4585

Signed-off-by: Luke Inman-Semerau <luke.semerau@gmail.com>