Fixed a lot of stuff.

It now creates texture json and image file upon uploading an image.
It gets stored json file on startup.
You can save the json by pressing ctrl-s (cmd-s)