core:  When there is no post upgrade files the ...

When there is no post upgrade files the creation of the database
repeats forever.

Adding a check if directory exists before getting pre/post upgrade
scripts.

Change-Id: I476b533b6df9814cfe8970dac0d3e71bc0d90017
Signed-off-by: Eli Mesika <emesika@redhat.com>
Bug-Url:https://bugzilla.redhat.com/886131