Added an -id option which uses the Mongo object _id value for the basname for generated files