Use File.directory? instead of Dir.exists?

Allows the buildpack to run under 1.8