Python port by Stuart Colville of Gruber's Perl Title Case script