[PATCH v2 4/7] scripts: fix Python string escapes