npm-ized promisify method