Add a inline helper function and a helper macro to be able to automatically close file descriptors. Does nothing if the argument is NULL or the pointed to integer is < 0.