Update functions.php

Changed createThumbnail() to support transparent PNG thumbnails.
Whoops, my bad. Then `$system[0] == "png"` is faster.