lapply through dictionary and directories