snapshotports.sh: various fixes and updates.