u/fjammes/dm-1338

Reviewing DM-1338
Simplest for me is probably not to use that function at all, instead of 

    check_dir_availability SOME_VAR

you could do 

    if [ ! -d "$SOME_VAR" ] ; then
        echo "SOME_VAR is not defined or directory is missing"
        exit 1
    fi