Load/save plain PPMs without error checking
Seems readable enough for me. When you're working with a standardized data there is no room for ingenuity, just a mechanical work that needs to be done correctly.

Maybe it is only this snippet 'P3'..('%s*(%d+)'):rep(3), that makes you thin for a while, whether there will be three 'P3's in result.