public function add($path, $group = null, $depth = null) {

		if (isset($this->working_group)) {
			$group = $this->working_group;
		} else if (! isset($group)) {
			throw new RuntimeException("Must set group or working group to add directory.");
		}

		if (! isset($this->groups[$group])) {
			$this->groups[$group] = array();
		}
		
		if (! isset($depth)) {
			if (isset($this->group_default_depths[$group])) {
				$depth = $this->group_default_depths[$group];
			} else {
				$depth = $this->default_search_depth;
			}
		}

		$this->groups[$group][$this->cleanpath($path)] = $depth;

		return $this;
	}