improved cleanPicture script, add command line arguments detection