Fixing “Cannot remove directory: File exists” error