implement rubyvmstub extension, part 2, dir functions