git hook: escape backslash

clang-format diff is not written out correctly if the code contains '\n'. The new line is interpreted by echo.
for newlines it is enough, but the text could contains also another escapes.