It still suffers from the scary thing of calling `os.removedirs('/foo/bar')` if common_base is `/var/base` and the dirs you want to remove is `/var/base/foo/bar`. 

I think my code is fine. It doesn't use fancy tricks but it's plain and straight forward at least.