Man jailed after ex-wife accuses him of rape