close file descriptors

and gracefully report errors when `fs_open` fails
Merge pull request #3 from stephenmathieson/close-file-descriptors

close file descriptors