fix handling of auth files ending with newline