Why separate it out and then chdir? Wouldn't `Dir.mkdir{|dir| ... }` work the same way?