core: Add current-output-port, open-output-file, set-current-output-port.