Allow paths to be mocked for easier testing.

This allows consuming libraries to mock the `path` and `homePath` during
their own test suites.