use File#directory? instead of File#exist?; ref c2d8b0
Merge branch 'master' of github.com:mruby/mruby