rmtree: import more code from slapos.core to support case of parent directory not writable

See merge request !22
1 job for master in 0 seconds
Status Job ID Name Coverage
  External
passed SlapOS.Buildout.UnitTest-Master.Python3

00:15:35