Update functions.php

Changed createThumbnail() to support transparent PNG thumbnails.
$system[0] is just the file extension, not the full name.  Thanks for keeping an eye out though.