PHP script to upload images and store them against their SHA1 hash