According to [the docs](http://ruby-doc.org/core-2.1.0/Dir.html) the second argument here is an encoding, which I take to mean a string. This should probably be called `encoding` and default to `nil`.