Fix Pruner not deleting nested empty dirs

This pull request is identical to #216, but targeted at the proper release branch. For the previous discussion on the changes, please refer to #216.