an attempt at downloading images to the file system in phonegap.