Delete function now working on directories as well as individual files.

Signed-off-by: abnegate <jake_barnby@hotmail.com>