fixed a unittest bug - payload files are now closed after being read
Merge pull request #281 from telefonicaid/bug/too_many_open_files__during_unittests

fixed a unittest bug - payload files are now closed after being read