mraa.c: fclose on NULL fp can segfault on some platforms

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>