A function to replace the old constructor call where a filename was passed in.

def from_filepath(cls, filepath):
        '''A function to replace the old constructor call where a filename was passed in.'''
        assert(os.path.exists(filepath))
        return cls(read_file(filepath))