Fix /proc/cmdline parsing when newline characters are present

Should fix bnc#887844