PIM-1261 Merge directory path with the file name

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Unit test passes: yes
Behat scenarios passes: yes
Checkstyle issues: no
ChangeLog updated: no
Documentation PR: ~
Fixes the following jira:
 - PIM-1261