Making the directory validation more robust in `this.request()`