Use FFI buffers instead of naked char buffers for the Dir.getwd method.