testcase for chown on directory failure mocking