RAZ-2475: PDF images are not re-created
- Fixed so that directory query is sorted by name and that the file [-0.jpg] one comes on top which is then used to form the jpgname variable properly