precommit: support running check/fix from git subdirectories
When running `precommit check` or `precommit fix` from a subdirectory
of a git repository (e.g., projects/fprime-ocaml when .git is at the
parent), the commands now correctly walk up the filesystem to find the
git root.
Changes:
- Add is_inside_git_repo to detect when cwd is inside a git repo
- Update find_git_projects to include directories inside git repos
- Update find_git_root to use absolute paths and full filesystem
- Update current_branch, backup_branch, rewrite_ai_attribution to
use find_git_root for locating the git repository
- Handle filesystem permission errors gracefully when walking up