Update directory.js

Changed this.template to exports.template