Clean up the logic when asking to overwrite an existing file. This now requires that the first non-blank character be a "y" or a "Y", and avoids a possible issue if the I/O operations on the terminal change errno.