driver/main: Factor out project finding code to its own function
driver/main: Factor out project finding code to its own function

Keeps the logic contained within its own function and makes the
assignment more straightforward within main().

AxioDL/PathShagged,AxioDL/PathShagged,AxioDL/PathShagged