Check $this->path is set before use, fixes #355