vnfsdk validation code refactoring in method createDirectory

https://sonarcloud.io/project/issues?resolved=false&severities=BLOCKER&types=VULNERABILITY&id=onap_vnfsdk-validation&open=AXk4ivruWcQzNZo7t49l

Issue-ID: VNFSDK-832

Signed-off-by: prakash.e@huawei.com <prakash.e@huawei.com>
Change-Id: Ib123d5f3648d81c3583119996ec7e50699f6cfec
1 file changed