Adding checks for dependencies to build script.


Modified build script that modifies the icon to check if both ImageMagick
and GhostScript are installed before attempting to use the commands. If
the commands can't be found then the script will just leave the images
as is.