Made directory configurable with this.directory member.