The Border Effect and the Nonlinear Relationship between Trade and Distance