Fix SubString{UTF8}

* case which led to endof < 0
* out-of-bounds case
Fix replace for UTF8 strings
Fix redirection deprecation warnings
Use `|>` for function piping instead of `|`