replaced tabs with spaces in script
better check for cli programs required for script to run
fixed checks for imagemagick