IF directory name is empty then try to extract one using absolute file name.