Open a new tab in the terminal at a specified path, relative or absolute

This command is already working quite nicely, simply putting it in a function seems to make tilde home directory expansion work when it does not on the command line directly:

tcd() {
  gnome-terminal --tab --working-directory=$1
}

Usage example:

tcd ~/Projects/find-it-program-locator/findit-dev/web/modules/contrib/findit_mit_sync/

Initial command courtesy of a few places, probably most clearly indicated at https://askubuntu.com/questions/102527/how-to-open-several-terminal-tabs-in-different-folders-working-directories

Enhanced thanks to Chris!

tcd() {
  if [ -d ${PWD}/$1 ]; then
    gnome-terminal --tab --working-directory=${PWD}/$1
  else      
    gnome-terminal --tab --working-directory=$1
  fi
}