Update ImageCommand.java

Causes NullPointerException in Windows when using with CompareCmd: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24053