Check container directory for DELETE permissions.

Fixes #536.