Fix escaping in tests between different platforms