Simplified, more robust logic for list_missing_pngs

For some reasons, dirname didn't work with xargs on server
when it was on local machine.