lock_repo_for_gc(): compute the path to "gc.pid" only once