Adapt readpe for the new libpe. Work in progress.