throw new Exception("Error: the local images directory was specified as a relative path ($this->imagesDirectory), but could not be resolved. Current directory: ".getcwd());
exit(1);
}else{
throw new Exception("Error: the local images directory specified does not exist: ".$this->imagesDirectory);