Avoid calling fclose multiple times

Both the signal handler and main close the output if it's not stdout;
if you do both, then fclose gets called twice, which annoys libc.

Signed-off-by: Keith Packard <keithp@keithp.com>
Test for device grab

From Peter Hutterer

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
.gitignore: add tools/evemu-event

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>