tee_input: safer record separator ($/) handling