jjb: increase precision of job searches

The ``for `ls .\` ... -d subdirectory`` logic was examining every entry at the top-level of the workspace, both files and directories. The files entries were useless since they would never contain subdirectories.

This pull request uses `find` instead to only locate directories at the top level.

The purpose of this change is to make the verbose output (with `set -x`) easier to read, and make it easier to spot errors in the future.