Update CountryPicturesQueryBuilder.java

Sorting out flags/maps and tidying the code up a bit to prevent threading screwing up the entire program. Objects are being created and destroyed in the method