delete function now works for files and folders withot spaces in the filename.