recovery: put node and elog into ctx
recovery: use provided temp dir
recovery: code cleanups