Require single main class

Update run tasks to ensure that only a single main class is required
when performing a class search.

See gh-886