Check if all objects are deleted before attempting to delete container.
Merge pull request #479 from ycombinator/working

Check if all objects are deleted before attempting to delete container.