Check the folder is empty before removing it