Thanks for your advice sam!
After looking up your code I've done some additions to the mod/folder plugin, though they are not as nice as your implementation, I'd like anyone to review it and giving some advice.
I know there should be some additional fields in the admin area/on the settings page to make this whole thing optional, but as a first alpha I'd like to share this with you guys. So please have a look at the attachment and leave some replies.
The file belongs to the mod/folder folder and my additions are in the function htmllize_tree.