Fixing a problem where a base exception was thrown (issue #14)
Fixing a problem where a BadImageFormatException was thrown but was not related to loading dlls

The BadImageFormatException is reserved for being thrown when the wrong
image format of a dll is found, and not for raster images.