Bugfix s3 upload

Bugfix and restructure some code so ckanclient can be used to upload data-files to s3.