I agree with epitd about giving St. Andrews a miss, unless you really want to go there. It's pretty far removed from anywhere in central Scotland, and there's no easy way to get there if you're overnighting in Stirling. It would be a bit easier from Perth, but if you're heading from Inverness to Perth, you may not have enough time to visit Perth, Stirling, and St. Andrews.
I disagree about renting your car out of Glasgow. For the money that you'd spend traveling from Edinburgh to Glasgow Airport, you'd be better off hiring your car at Edinburgh Airport, then spending the day in Glasgow without having to worry about getting to the airport the next day, or carrying your luggage everywhere. Once you get to Glasgow, you can leave the car and luggage at your hotel/B&B and visit the sights on foot or by public transportation/taxi. I'd recommend People's Palace, the Necropolis, and Glasgow Cathedral, if you're pressed for time; and if you're into shopping, Argyle Street/Buchanan Street/Sauchiehall Street would be the place. If you decide to park in town in Glasgow, the best places are near St. Enoch's. It's not cheap, but it's convenient.
While in Glasgow, if you're driving, DO NOT drive in the bus lanes. The fines are ridiculous.
Don't forget, you'll be driving on the left!
If you're heading from Fort William to Skye via the CalMac ferry from Mallaig, be sure to make a reservation ahead of time. There are nine sailings daily, but they fill up fast in August. It's the best way to get to Skye from Fort William. Make sure you've arranged accommodation on Skye ahead of time. It has become a major tourist destination, and the British press has been printing horror stories of visitors sleeping in their cars due to lack of accommodation.
Have a wonderful time!
p.s.: If you're going to Castle Campbell in Dollar, the drive up to the car park is steep and narrow. It may be best to park in town and hike up Dollar Glen.