util: made subprocess::call more robust