unit test for dircopy to unwritable target

Tests a directory copy with an unwritable target location, and verifies that it
produces the correct error output (and does not fail in other ways)