Ok, here's a bad boy for you:
=PROPER(IFERROR(IF(LEN(A2)-FIND(CHAR(135),SUBSTITUTE(A2,".",CHAR(135),LEN(A2)-LEN(SUBSTITUTE(A2,".",""))))=1,A2,RIGHT(A2,LEN(A2)-2*(LEN(A2)-LEN(SUBSTITUTE(A2,".",""))))&"."&LEFT(A2,2*(LEN(A2)-LEN(SUBSTITUTE(A2,".","")))-1)),A2))