Know the company you're buying from, ... I would opt for purchasing directly from a Hertz or Enterprise. But I'd be careful of vehicles that come from corporations. They can generate lots of mileage.
Buying a rental car from a reputable company makes good sense. You know they've been well-maintained and they're reasonably priced, for the most part.
Watch out for those cars owned by salesmen or servicemen. Any educated consumer can look at a car and tell whether it's well maintained. Twenty-to-thirty thousand miles are common (for a rental or fleet car). Look at the odometer and the type of vehicle.