update directory add to cover cases of undefined parent directory passed as parameter or relative path name passed.