s/Dir.exist/File.exist/ to make it work in 1.8.7

Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>