Actually check if ImageOptim is installed.
apply Simen Brekken's fix to src
1.7.2
explicitly reference /usr/bin/stat, fixes #59
1.7.3