System tests typically run outside the workspace directory, but they still have read-only access to the workspace; fix it accordingly. This test only works on git checkouts, not in tarballs, so skip it if .git doesn't exist.