I don't think necros produce copies of their books, but in my latest fortress the human caravan brought copies of books with secrets more or less every time, and they were all written by the same necro, so the humans had probably raided his tower and then made copies of the books within. I guess being obsessed with mortality can cause necros to write book after book on the subject...
I'm not sure about what the question really is, but the Librarian script is not part of DFHack, so it has to be fetched separately (the link is in the thread). The script doesn't take any command line parameters, but rather work by taking commands when started (assuming it was saved as "librarian.lua" it would be invoked by "librarian" from the DFHack console).
It's usually better for scripts not to be part of DFHack, as it allows them to be updated when bugs are detected/new functionality is introduced, rather than having to wait for the next DFHack release, which can be many months. Also, it's possible to make scripts support multiple DFHack and DF versions, including old ones, with some clever conditional execution, something you can't do with compiled code (the Librarian doesn't support any versions except the current one, but some other scripts of mine do have some backwards support). Of course, something supplied with DFHack doesn't make much sense to support other versions than the one they're included in.