1) Adding compatibility for web client

2) Changing shell rm invokes for directory deletes  to php API calls.