git hook: escape backslash

clang-format diff is not written out correctly if the code contains '\n'. The new line is interpreted by printf.