Upstream

Gday Ben,

Thanks heaps for writing this fantastic API! I have been using in my WordPress plugin and it has been working great. It turnes out it can work with PHP 5.2.16 or higher so I have back ported my version and simplified it a bit for better reuse.

Anyways I thought I would contribute some of my tweaks back upstream. 

**1. Ignore DS_Store on OSX and convert tabs to four spaces where spacing was off.**

They are both a tad annoying :-)

**2. Ensure the path has a trailing slash when uploading chunked uploads.**

Without it the file will be uploaded with a concatenated folder and file name.

**3. Raise an exception if a cURL error occurs**

The API raises Dropbox errors but not curl errors. I found this out the hard way on a flight the other day. 

I hope this helps!

Cheers,
Mikey