As you have your taskbar unlocked, you can just drag ( left click on the folder and drag out to desktop ) the folder back out, it will result in a window opening on your desktop but you can just delete this as its a shortcut to th emain folder you dragged onto the taskbar.

Yo may also see a Toolbar close warning.. just click ok to that.

OR

Right Click the toolbar and choose Toolbars > then click to untick the folders name and it will go from the list and taskbar.

But to be on the safe side, find the original folder and rename it with an extra letter or number before doing the above, I have done the same as you and the methods above work ok with no lost folders for me.