added code for detecting OSTYPE - see: http://stackoverflow.com/questions/394230/detect-the-os-from-a-bash-script/18434831