I have a read only directory copied from version controlled directory which is locked.
The method that I have used is to do:
if os.path.exists(target) :
subprocess.check_call(('attrib -R ' + target + '\\* /S').split())
shutil.rmtree(target)
Before anyone jumps on me, I know that this is dreadfully un-pythonic, but it is possibly simpler than the more traditional answers given above, and has been reliable.
I'm not sure what happens regarding read/write attributes on directories. But it hasn't been an issue yet.