Add logic to handle only one project being returned

I've actually refactored this script quite a bit. This initial commit just accounts for the simple case when only one project was being returned. I know it includes a bit of code duplication but if you're interested I'd be happy to include the rest of the updates I've done to the script.

Thanks for all that you guys do!