Directory fix for powershell 2

This script was build to run on PS3 but the C.I. server has PS2 so we have
to tweak how we look for directories.