Added util functions for reading and writing PFM files