Set resource filenames when publishing pending resources

There is a unique constraint on the module_files table for
(module_ident, filename).

Publish pending resources was failing because filename was not set.

Fix #15