Fix git_remote_dup & add missing const

@carlosmn Does that look ok?