Listing only directories via scripting is deceptively difficult. This recipe introduces multiple ways of listing only directories.