opendir() should be rewritten to GET_DIR_AS_ARRAY()