Ensure that builder cleans directory properly.

Prior to this change, only the first item in the directory would be
removed (oops).
Merge pull request #1122 from rjackson/ensure-directory-is-cleaned-up

Ensure that builder cleans directory properly.