Fix for config in Ruby 1.9

In 1.9, Dir.chdir accepts a block with one argument, that is the path
after it changed the directory.