ruby check if file exists and is readable