Teach `git_path_is_valid` to respect `core.longpaths`. Add helper methods to validate length and set the error message appropriately.