Fixin up deleting pseudo directories
Fixin up deleting pseudo directories

- Adding a trailing "/" if needed so that it is not required.
- Restructuring the logic to be a bit simpler.
- Adding a test to ensure that "/" is not needed.

cjyclaire/aws-sdk-php,BoXHocK/aws-sdk-php,Avantians/aws-sdk-php,ilons/aws-sdk-php,aws/aws-sdk-php,Briareos/aws-sdk-php,oswaldderiemaecker/aws-sdk-php,easybiblabs/aws-sdk-php,andythorne/aws-sdk-php,kmidev38/aws-sdk-php,jeskew/aws-sdk-php,jeskew/aws-sdk-php,Briareos/aws-sdk-php,MaxKlyukin/aws-sdk-php,piotrpasich/aws-sdk-php,femans/aws-sdk-php