Fix "Could not delete" Exception on removeDirectory