Fixed not fully working requires in dir based functions like file.direct...

The problem is described at https://github.com/saltstack/salt/issues/18578 . Here is fix.
I'm sorry for duplicating.