New function `setup()` that works like `create()` but assumes an existing, not necessarily empty, directory

As discussed. `create()` calls `setup()` and now also deletes the created directory upon failure.

Fixes #627.
Indeed, I wasn't sure how to propagate the error. Thanks!