Update script.js

Fixing addPicture function