#names go a bit funny here
unppnmbase=$dir/upg-${pgn}
if [ ! -e ${unppnmbase}-1.pnm ] || [ ! -e ${unppnmbase}-2.pnm ] || [[ $forceunpaper ]]; then
#names go a bit funny here
unppnmbase=$dir/upg-${pgn}
if [ ! -e ${unppnmbase}-1.pnm ] || [ ! -e ${unppnmbase}-2.pnm ] || [[ $forceunpaper ]]; then