repository: fix fs usage
repository: add test using the mocked filesystem for PR #100