Updated unit tests and better support for doc types.

Separated out the supported document types into two arrays, one for
downloading and one for uploading. Also updated the unit tests to work
with the latest version of PHPUnit.