You don't have to do all this path manipulation and `sprintf` stuff. I think you can you do

````c
cl_git_pass(git_futils_mkdir_r("empty_standard_repo/no_permission", NULL, 0777));
cl_git_mkfile("empty_standard_repo/no_permission/foo");
p_chmod("empty_standard_repo/no_permission", 0644);
```

The `clar` test framework always sets things up so we are `chdir`'ed to the root of the test directory, so it is easier just to use simple paths, I think.