Fix slave hanging caused by sending unicode as initialStdin for shell command