getTemplatePath = (templatesPath, pathname) =>
    new Promise((resolve, reject) => {
        lstatPromise(templatesPath).then(
            data => {
                let templateStat = {
                    isFile: data.isFile()
                };

                if (templateStat.isFile) {
                    templateStat.path = templatesPath;
                } else {
                    templateStat.path = factoryFilePath(
                        templatesPath,
                        pathname
                    );
                }

                return resolve(templateStat);
            },
            err => {
                return reject(new TemplateError(err));
            }
        );
    })
Returns the template path validating a exactly file or a directory

@param  {String} templatesPath - TemplatesPath config
@param  {String} pathname - Path name based on Request Object

@return {Promise} Template Info object on success or TemplateError on fail