Move file processing functions to libgfshare.c.
Mac/git compatibility.