Fix errors during tests
Created by: joaodefelipe
Bash doesn't like null bytes on command substitution, and head -zn 1
can sometimes (subject to system latency) exit before xargs is done writing to the pipe. Without this commit, only the first test passes.
Squash xargs error messages and remove null bytes before command is substituted.
Fixes "warning: command substitution: ignored null byte in input" and "xargs: sh: terminated by signal".