strip newline when using strtok or strsep to parse input