build directories file if it doesn't already exist