(ExtractImage): output path could contain directory name.