Replace irritating .readlines which keeps newlines