Added safe_fname() that converts any newlines in a name into '?'s.