Fix filename always being set to the first file's path.

As my test shows, filename never changes from the first, causing caching issues with ejs.