Check we can write to the given directory?