Media upload test coverage

* Adds test cases for media uploading
* Moves curl request logic into a Request class
  * Can be further moved to a 3rd party client later on hopefully