Return a list of all the directories on the path.

def get_path_directories():
    """Return a list of all the directories on the path.
    """
    pth = os.environ['PATH']
    if sys.platform == 'win32' and os.environ.get("BASH"):
        # winbash has a bug..
        if pth[1] == ';':  # pragma: nocover
            pth = pth.replace(';', ':', 1)
    return [p.strip() for p in pth.split(os.pathsep) if p.strip()]