fix paths and switch to promise to facilitate jasmine-node testing