xcbgrab: Support empty filename string correctly

Bug-Id: CID 1254664
CC: libav-stable@libav.org