While messing around in wizmode, I discovered a new trick today. I tested this in regular game too, so it's sure to work. Using either acid rain or vomit to dissolve the walls and bookcases of the library, you can safely kick out the items from the library and pick them up for free. In normal shops kicking the goods would be vandalism, but for some reason this is not so in the library. This could probably be used to leech the library dry of gold by selling back their own wares and stealing them again.
I'm pretty sure this behaviour wasn't intended by the devs.