Fixed bugs

Fixed bugs concerning the use of get metadata operations. These
operation do not close files if they return an handler. Files should be
closed by the caller.
Added option in terastitcher to create the directory hierarchy without
saving any image (could be used to parallelize the ‘merge’ step)