make sure dir exists before calling ln