Fixes ENOTEMPTY error when deleting a folder