Added tests for DirResource.
Filenames are rendered with a specialized template engine: FilenameEngine.
Simplified resource factories in tests: using default (empty) values of constructors.