Fixes #3970,#3139: (INTEGRATION) Create a directory to store failed inve...

...ntories

Ticket: http://www.rudder-project.org/redmine/issues/3970

To be merged in 2.8