Use configuration, not code for setting partials dir: [docs](https://github.com/ericf/express-handlebars#partialsdirviewspartials)