Fixes deprecated use of File.exists?