enable function to return an object with curPath being returned

Usable by grunt-contrib-handlebars