bugfix: flush out file contents before reading them back

when creating repos, flush file contents to file before starting to read. i'm not certain on python internals in handling this, but this makes sure everything is in the file ready for reading first.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
bugfix: close the filehandle once done with downloading a repo

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Merge pull request #47 from TelekomCloud/flush-file

bugfix: flush out file contents before reading them back