Add sprintf module and refactor console(3) to use sprintf.