S3 Repository: Fix creating directory for the target

Fix a few bugs:
Make sure that there is a terget directory for the downloaded file
Do not expect an empty directory in the bucket

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Merge pull request #24 from amnonh/mkdir_s3

S3 Repository: Fix creating directory for the target