Deletes a folder.
Deletes the folder specified by <foldername>.
If the folder is deleted successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.
However, the folder can not be removed if files within the folder exist.