Final version. Contains some experimental (unfinished) code to check if
a new pic's name exists for another already in the dB.