Fix a typo: path.nil should be path.nil?