Fix dir check when chef is run under ruby 1.8