Changed File throws to proper exceptions.
Added File::remove and File.write.