Normalize OS specific errors paths to make difftests work Related to #21
Now all regexp functions should work similar to string version for buffers. Added scan_toend that works as scan but outputs buffer from match to end of buffer, useful when trying to decode a format and you dont know or care to limit.
Hopefully can be reused for docs generation