- Restore backwards compatibility by checking both XDG and legacy Brewfile paths
- Use existing file when available, only use XDG path for new file creation
- Replace FileUtils.mkdir_p with Pathname#mkpath as requested
- Add comprehensive test coverage for all scenarios
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>