Trying to remove newline characters from the readline call