tests/unix_sockets: Make the string parsing method a bit saner