Refactor file loading to remove duplication
Refactor file loading to remove duplication

The file loader logic was unnecessarily duplicated across the top-level
file case and the recursive file case. These changes refactor the
implementation so that the logic is in one place and the file walker has
access to the depth which could be used in the future to place a limit
on recursion depth.

Signed-off-by: Torin Sandall <933af5bec0bc58056526d55ca6c7b45fcf14cc48@gmail.com>

open-policy-agent/opa,open-policy-agent/opa,tsandall/opa,open-policy-agent/opa,open-policy-agent/opa,open-policy-agent/opa,tsandall/opa,tsandall/opa,tsandall/opa,open-policy-agent/opa,tsandall/opa,tsandall/opa