Adding functions to rename os x terminal tab and window titles

This functions well known and works on 10.9, 10.8, 10.7 and maybe even on older version of OS X.

Original code is from http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/