BF+TST: test+fix bugs for PCA on reordered images

The `screen` and `write_screen_res` functions were assuming time-last
ordering in a couple of places.  Test and fix.