Updated "delete" functionality

Now works on both linux and windows servers.