figurehead.api.util.file: expose common file reading/writing and text encoding/decoding as API interface