switch_ioscheduler(): only remove the last character if it's a newline