create tmp directory when not exist and skip empty key