fix a resource leak for remote URLs

Minimagick was leaking file descriptors when used with remote paths (ie HTTP URLs).