Update functions.php

Changed createThumbnail() to support transparent PNG thumbnails.
Minor thumbnail function tweaks
Keep transparency when thumbnailing PNG files