Remove warnings

Ruby 2.1.0 and 2.2.0 with -w option warned following messages:

 * warning: assigned but unused variable
 * warning: File.exists? is a deprecated name, use File.exist? instead

I fixed these warnings.