Move encoding utilities to the io module
Move get_temp_dir to io module
Move error messages to new util module
Move warn and die to the util module