Fix CLI to use Promises.