Unlink returns an error for non-empty directories when the backend does not support recursive unlinking. Fixes #1750
Issue #1648