This is a very interesting way to approach this. What's your primary dev language? Looks very Python/C :)

What do you think of the following?

```ruby
filename = File.join(directory, "#{date.strftime('%Y-%m-%d')}-#{post[:slug]}.markdown")
```

It's a bit more idiomatic to Ruby (but that doesn't mean we have to do it that way)