Fix getting all files in a bucket

* Change API call for getting all files in a bucket to include a
delimiter so that only files in the root bucket are returned.
* Switch to a different method of checking whether a particular entry
is a folder by checking if the last character in the name property is a
/.
* Encode the delimiter parameter.

Make folder and fileName variables