Add fclose() support

Fixes #29

Signed-off-by: David Goulet <dgoulet@ev0ke.net>